/*
 * Copyright (c) 2025 CAX Conversion Project
 */
package com.comac.ins.isfd.domain;

import com.anwen.mongo.annotation.ID;
import com.anwen.mongo.annotation.collection.CollectionField;
import com.anwen.mongo.annotation.collection.CollectionName;
import com.anwen.mongo.enums.FieldFill;
import com.comac.ins.isfd.domain.bo.IsfdAnalysisBo;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

/**
 * 算法实体类
 *
 * @author hxloongs
 * @date 2024-7-8
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@AutoMapper(target = IsfdAnalysisBo.class)
@CollectionName(value = "analysis_list")
public class IsfdAnalysis {

    @ID
    private String _id;

    @CollectionField("analysis_type")
    private String analysisType;

    @CollectionField("application_type")
    private String applicationType;

    @CollectionField("classification_type")
    private String classificationType;

    @CollectionField("display_name")
    private String displayName;

    @CollectionField("is_published")
    private Boolean isPublished;

    @CollectionField(value = "published_time")
    private Date publishedTime;

    @CollectionField("material_type")
    private String materialType;

    @CollectionField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @CollectionField("calculate_object")
    private List<CalculateObject> calculateObjects;

    @CollectionField("uploaded_help_doc")
    private Boolean uploadedHelpDoc;

    @CollectionField("uploaded_result_template")
    private Boolean uploadedResultTemplate;

    @Data
    public static class CalculateObject {
        @CollectionField("object_type")
        private String objectType;
        @CollectionField("object_name")
        private String objectName;
    }
    /**
     * 元数据管理id
     */
    @CollectionField("metadata_management_id")
    private String metadataManagementId;
}
